package org.ne.banksys.DTO;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author wey
 * @date 2025/6/23 下午2:01 06
 **/




@Data
public class UserRegisterDTO {
    @NotBlank(message = "客户姓名不能为空")
    @Size(max = 50, message = "姓名长度不能超过50字符")
    private String customerName;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{6,}$",
            message = "密码需含大小写字母和数字，长度≥6")

    private String password;

    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",
            message = "身份证格式错误")
    private String PID;

    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    private String telephone;
}
